package com.yiyi.credit.manage.abutment.common.enums;

public enum SpendEnum {
    //中诚信
    CREDIT_MULTIAPPL_SPEND("/credit/multiappl","0.8"),
    CREDIT_CONSUMABLIITY_SPEND("/credit/consumability","2.8"),
    IDENTITY_AUTH_SPEND("/identity/auth","0.4"),
    CREDIT_SCORE_GENERAL_FACTORS_SPEND("/credit/score/general/factors","2.3"),
    CRIMINAL_QUERYSCORE_SPEND("/criminal/queryscore","2.5"),
    IDEN_LOCAT_SPEND("/iden/locat","0.05"),
    TELECOM_IDENTITY_SPEND("/telecom/identity/3mo/t1","0.5"),
    AUTH_CNCM_SPEND("/auth/cncm/t2","0.3"),
    RISKINFO_CREDIT_SPEND("/riskinfo/credit","0.2"),
    EDU_QUERY_SPEND("/edu/query","1.8"),
    BANK_CARDBIN_SPEND("/bank/cardbin","0.05"),

    RISKINFOT1_SPEND("/riskinfo/t1","5"),
    RISKINFOT1DETAIL_SPEND("/riskinfo/t1/detail","0"),
    TRANSREPORTT2_SPEND("/trans/report/t2","2.2"),
    CERT_SPEND("/cert","0.6"),
    VEHICLEINFO_SPEND("/vehicle/info","1"),
    TELECOMCONSUMABILITY_SPEND("/telecom/consumability","0.4"),
    TELECOMSTATETIME_SPEND("/telecom/statetime","0.6"),
    ICINFO_CATEGORY_SPEND("/icinfo/category","3.5"),
    ICINFO_CATEGORY_PERSON_SPEND("/icinfo/category","3"),
    ICINFO_CATEGORY_PERSON_TID("/icinfo/category/person/tid","0"),
    ICINFO_REPORT_SPEND("/icinfo/report","10"),
    AIRTRAVEL_TRAREPORT_SPEND("/airtravel/trareport","3"),

    //同盾
    ANTIFRAUD_SPEND("/antifraud","0.5");

    private final String code;
    private final String value;

    SpendEnum(String code, String value)
    {
        this.code = code;
        this.value = value;
    }

    public String getCode()
    {
        return code;
    }

    public String getValue()
    {
        return value;
    }

    public static boolean isSpendCode(String code)
    {
        for (SpendEnum s : SpendEnum.values())
        {
            if (s.getCode().equals(code))
            {
                return true;
            }
        }
        return false;
    }
    /**
     * 根据编码获取信息
     * @param code
     * @return
     */
    public static String getValueByCode(String code)
    {
        for (SpendEnum v : SpendEnum.values())
        {
            if (v.getCode().equals(code))
            {
                return v.getValue();
            }
        }
        return null;
    }
}
